package cn.v2tila.rsosa.student.service.serviceImpl;

import cn.v2tila.rsosa.student.entity.MsgTemplateEntity;
import cn.v2tila.rsosa.student.jpa.MsgTemplateJPA;
import cn.v2tila.rsosa.student.service.MsgTemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author v2tila on 18:22 2019/4/5
 */
@Service
public class MsgTemplateServiceImpl implements MsgTemplateService {
    @Autowired
    private MsgTemplateJPA msgTemplateJPA;
    @Override
    public MsgTemplateEntity saveAndFlush(MsgTemplateEntity msgTemplateEntity) {
        return msgTemplateJPA.saveAndFlush(msgTemplateEntity);
    }

    @Override
    public List<MsgTemplateEntity> findByUniqueId(String uniqueId) {
        return msgTemplateJPA.findByUniqueId(uniqueId);
    }

    @Override
    public void deleteById(Integer id) {
        msgTemplateJPA.deleteById(id);
    }
}
